Home
PHP
Tags
PHP Tutorial
Latest Articles
English
English
简体中文
中文(繁體)
日本語
한국어
Français
Deutsch
မြန်မာဘာသာ
Current Location:
Home
>
Function Categories
>
date_sub
date_sub
DateTime::sub - Subtract a certain amount of days, months, years, hours, minutes, and seconds to a DateTime object
Name:
date_sub
Category:
Date and time
Programming Language:
php
One-line Description:
Subtract the day, month, year, hour, minute, and second from the specified date.
Related
Use date_sub function to subtract weekdays: How to avoid weekends
2
What Are the Differences Between date_sub and date_add Functions? How to Use Them Together?
3
Frequently Asked Questions about the date_sub function when handling time zones
2
date_sub function: How to subtract a specified time from the current date
9
Similar Functions
timezone_name_get
timezone_name_get
AliasforDateTimeZo
date_get_last_errors
date_get_last_errors
AliasforDateTime::
date_default_timezone_get
date_default_timezone_get
Getthedefaulttimezon
microtime
microtime
ReturnsthecurrentUni
date_sun_info
date_sun_info
Returnsanarraywithin
gmstrftime
gmstrftime
FormatGMT/UTCtime/da
timezone_name_from_abbr
timezone_name_from_abbr
Returnthetimezonenam
date_format
date_format
AliasforDateTime::
Popular Articles
Frequently Asked Questions about the date_sub function when handling time zones
Use date_sub function to subtract weekdays: How to avoid weekends
date_sub function: How to subtract a specified time from the current date
What Are the Differences Between date_sub and date_add Functions? How to Use Them Together?